<?php
declare (strict_types = 1);

namespace app\model\communal;

use app\model\concern\AmisTrait;
use think\Model;
use think\db\Query;
use think\model\relation\BelongsTo;

class OrderMultiSubModel extends Model
{
    use AmisTrait;

    /**
     * 数据库配置
     *
     * @var string
     */
    protected $connection = 'communal';

    /**
     * 主键
     *
     * @var string
     */
    protected $pk = 'order_multi_id';

    /**
     * 表名
     *
     * @var string
     */
    protected $table = '50001_order_multi_sub';

    // 设置json类型字段
    protected $json = ['order_multi_type', 'order_multi_topic', 'order_multi_result'];

    // 设置JSON数据返回数组
    protected $jsonAssoc = true;

    /**
     * 展示字段名
     *
     * @var string[]
     */
    public static $column = [
        'order_multi_id', 'order_multi_type', 'order_multi_topic', 'order_multi_result'
    ];

    /**
     * 搜索字段名
     *
     * @var string[]
     */
    public static $searchColumn = [
        'order_multi_id'
    ];

    /**
     * 新增字段
     *
     * @var string[]
     */
    public static $saveColumn = [
        'order_multi_id', 'order_multi_type', 'order_multi_topic', 'order_multi_result'
    ];

    /**
     * 更新字段
     *
     * @var string[]
     */
    public static $updateColumn = [
        'order_multi_id', 'order_multi_result'
    ];

    /**
     * @var string[]
     */
    public static $itemColumn = ['order_multi_id', 'order_multi_result'];
}
